<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="language" content="vi"/>
    <link type="image/x-icon"
          href="<?php echo Yii::app()->request->baseUrl; ?>/images/favicon.ico"
          rel="shortcut icon">
    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css"
          href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css"
          media="screen, projection"/>
    <link rel="stylesheet" type="text/css"
          href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css"
          media="print"/>
    <!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css"
          media="screen, projection"/>
    <![endif]-->
    <!-- Import fancy-type plugin. -->
    <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/plugins/fancy-type/screen.css" type="text/css" media="screen, projection"/>
<!--    <link rel="stylesheet" href="--><?php //echo Yii::app()->request->baseUrl; ?><!--/css/plugins/link-icons/screen.css" type="text/css" media="screen, projection"/>-->
    <link rel="stylesheet" type="text/css"  href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css"   media="screen, projection"/>

    <title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="container" id="page">

    <div id="header">
        <div id="logo">
            <img
                src="<?php echo Yii::app()->request->baseUrl; ?>/images/lntlogo.png"/>
        </div>
    </div>
    <!-- header -->

    <div id="mainMbMenu" class="clearfix">
        <?php /*$this->widget('application.extensions.mbmenu.MbMenu', array(
        'items' => array(
            array('label' => 'Trang chủ', 'url' => array('/site/index')),
            array('label' => 'Quản trị', 'url' => array('/admin/default/index'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin')),
                'items' => array(
                    array('label' => 'Phân quyền', 'url' => array('/rights'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Thành viên', 'url' => array('/admin/user'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Bình luận', 'url' => array('/admin/comments'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Giáo viên', 'url' => array('/admin/teacher'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Cơ sở đào tạo', 'url' => array('/admin/facility'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Khóa học', 'url' => array('/admin/training'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Lớp học', 'url' => array('/admin/guitarclass'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Học viên', 'url' => array('/admin/students'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Video channel', 'url' => array('/admin/videocat'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Video', 'url' => array('/admin/video'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Bản nhạc', 'url' => array('/admin/song'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Tin tức', 'url' => array('/admin/news'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Danh mục sản phẩm', 'url' => array('/admin/productcat'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Sản phẩm', 'url' => array('/admin/product'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                    array('label' => 'Trang tĩnh', 'url' => array('/admin/page'), 'visible' => (!Yii::app()->user->isGuest && Yii::app()->user->checkAccess('admin'))),
                ),
            ),

            array('label' => 'Khóa học', 'url' => array('/training/index')),
            array('label' => 'Video', 'url' => array('/video/index')),
            array('label' => 'Bản nhạc', 'url' => array('/song/index')),
            array('label' => 'Mua nhạc cụ', 'url' => array('/product/index')),
            array('label' => 'Tin tức', 'url' => array('/news/index')),
            array('label' => 'Giới thiệu', 'url' => array('/site/page', 'view' => 'about')),
            array('label' => 'Liên hệ', 'url' => array('/site/contact')),
            array('label' => 'Đăng nhập', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
            array(
                'label' => Yii::app()->user->name,
                'url' => array('/user/profile', 'username' => Yii::app()->user->name),
                'visible' => !Yii::app()->user->isGuest,
                'items' => array(
                    array('label' => 'Tài khoản', 'url' => array('/user/profile', 'username' => Yii::app()->user->name), 'visible' => !Yii::app()->user->isGuest),
                    array('label' => 'Đăng bản nhạc', 'url' => array('/song/post'), 'visible' => !Yii::app()->user->isGuest),
                    array('label' => 'Thoát', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest),
                ),
            )
        ),
        'htmlOptions' => array('class' => 'clearfix'),
        'lastItemCssClass' => 'last',
        'firstItemCssClass' => 'first'
    ));*/
        $data = Hierarchy::model()->findAll('parent=:parent', array('parent' => '0'));
        $items = array();
        if($data){
            foreach($data as $pitem){
                $items[] = $pitem->getListed();
            }
        }
        $items[] = array('label' => 'Đăng nhập', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest);
        $items[] = array(
            'label' => Yii::app()->user->name,
            'url' => array('/user/profile', 'username' => Yii::app()->user->name),
            'visible' => !Yii::app()->user->isGuest,
            'items' => array(
                array('label' => 'Tài khoản', 'url' => array('/user/profile', 'username' => Yii::app()->user->name), 'visible' => !Yii::app()->user->isGuest),
                array('label' => 'Đăng bản nhạc', 'url' => array('/song/post'), 'visible' => !Yii::app()->user->isGuest),
                array('label' => 'Thoát', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest),
            ),
        );
        $this->widget('application.extensions.mbmenu.MbMenu', array(
        'items' =>$items));
        ?>
    </div>
    <!-- mainmenu -->
    <?php if (isset($this->breadcrumbs)): ?>
    <?php $this->widget('zii.widgets.CBreadcrumbs', array(
        'links' => $this->breadcrumbs,
    )); ?>
    <!-- breadcrumbs -->
    <?php endif?>

    <?php echo $content; ?>

    <div class="clear"></div>

    <div id="footer">
        &copy;
        <?php echo date('Y'); ?>
        bởi LNT Team. All Rights Reserved.<br/>

        <p></p>
    </div>
    <!-- footer -->

</div>
<!-- page -->

</body>
</html>
